import requestMeeting, { request } from '@/plugins/axios'
import { IShare } from './interface'

export const fetchShare = async (meetingMoid: string) =>
	request<IShare>({
		url: `/meetings/${meetingMoid}/share`,
		method: 'get',
	}).then((res) => res)

export const fetchSetCookieForShare = async (meetingMoid: string) =>
	requestMeeting<string>({
		url: `/cookie_info`,
		method: 'get',
		params: {
			meeting_moid: meetingMoid,
			type: 3,
		},
		__special__: 'share',
	} as any)
